﻿#include <iostream>
#include <string>
#include <thread>

#include <zmq.hpp>

#include "../../inc/helper.hpp"

int main()
{
	zmq::context_t ctx;
	zmq::socket_t worker = zmq::socket_t(ctx, zmq::socket_type::rep);
	worker.connect("tcp://localhost:5560");

	while (true) {
		std::string request = receive_string(worker);
		info("Recv request: {}", request);

		std::this_thread::sleep_for(std::chrono::seconds(1));

		send_string(worker, "World");
		info("Send reply: World");
	}
}
